
using System.Threading;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Collections.Generic;
namespace com.tc.gateway.tunnel
{

    public class TcpTunnelClient : TunnelClient
    {
        string ip;

        public TcpTunnelClient(string ip, short port)
        {

            this.ip = ip;
            this.port = port;

            s = new TcpClient(ip, port);


        }

        short port;

        TcpClient s;


        public void ClosePort()
        {
            // TODO Auto-generated method stub

        }


        /* (non-Javadoc)
         * @see com.tc.zigbee.tunnel.TunnelClient#getInputStream()
         */
        public Stream getInputStream()
        {

            try
            {
                return s.GetStream();
            }
            catch (IOException e)
            {
                //	e.printStackTrace();
            }
            return null;
        }


        /* (non-Javadoc)
         * @see com.tc.zigbee.tunnel.TunnelClient#getOutputStream()
         */
        public Stream getOutputStream()
        {

            try
            {
                return s.GetStream();
            }
            catch (IOException e)
            {
                //	e.printStackTrace();
            }
            return null;
        }
    }
}
